<template>
  <div>
    <div class="box">🔔 {{ billboard.content }}
      <div class="is-size-7">
        发布于:{{ dayjs(billboard.createTime).format("YYYY/MM/DD") }}
      </div>


    </div>
    <div class="columns">


      <div class="column is-3">
        <Menu></Menu>
      </div>

      <div class="column is-6">
        <TopicList></TopicList>
      </div>


      <div class="column is-3">
        <card-bar></card-bar>
      </div>



    </div>
  </div>
</template>

<script>

import {getBubbleboard} from "@/api/bubbleboard";
import CardBar from "@/views/card/CardBar";

import PostList from "@/views/post/index"
import Menu from "@/views/menu/Menu";

export default {
  name: 'Home',
  components:{CardBar,TopicList:PostList,Menu},
  data() {
    return {
      billboard: {
        content: "",
        createTime:"",
      },
    };
  },
  created() {
    this.fetchBillboard();
  },
  methods: {
    async fetchBillboard() {
      getBubbleboard().then((value) => {
        const {data} = value;
        this.billboard = data;
      });
    },
  },
};
</script>
